home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 3
/
BBS in a box - Trilogy III.iso
/
Files
/
Prog
/
Q-R
/
RR⁄Tabby Source Code Folder
/
Mantissa 1.0.source
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
Text File
|
1990-05-25
|
61.2 KB
|
1,900 lines
|
[
TEXT/MACA
]
' Code by: Mike Lininger
' 385 Bowling Green Place
' Gahanna, Ohio 43230
' (614) 471-6209 (BBS)
5-25-90
I am making most of my code available to anyone interested in developing
their own Second Sight/Tabby utilities. This source is not designed to be
compiled and run. It is missing key functions and pieces of code that are
Copyright me and others, that are not to be released at this time.
This code is for example purposes only. It illustrates various ways of reading
writing and process data from a variety of SS/Tabby files. It illustrates
the use of Block Reads and Indexes amoung other things.
If you use any portion of this code you must abide by two rules, or you
void the agreement that I am making with you and are subject what the law
dictates.
They are simple.
1. If you us any of this code you must give Michael Lininger and Lininger
Technology credit in both the program and the documentation.
2. It is agreed I am to receive a free copy of the program whether it is
free, sharware or commercial.
Now you must read on a little further and we will be done.
A little history on why I choose ZBasic as the root for my utilities.
I use to be one of those people that would smirk every time someone mentioned
they were using BASIC (until 3 years ago I and others had ever right to
smirk) and would say how nice. But thought yeh! Real programmers only use
C or Assembler.
Then came along Microsofts QuickBasic for the IBM. This baby was hot
it gave you all features of C and Pascal, plus core logic of Assembler,
all packaged into a neat super easy to learn and use package. This cut out
months of development work plus the finial applications were a hell of a lot
better looking, cause you could do so much in a short period of time.
This set the tide for a new generation of Basic's. Zedcor introduced ZBasic
for the mac, which gave complete control over the toolbox plus it compiled
into nice neat assembly and was fast.
ZBasic I have found to be extremely powerful and fast, in most cases it
matches or out performs the best C compilers out there. Now when someone
says heh I finished this great C project that I have been working on for 6
months, I now smirk and say how nice. But think yeh! I could have done
the same thing in 1/4 the time and saved you 300,000.00 and ended up with
a lot cleaner and more professional looking product all at the cost of an
extra 14k of file size.
The only draw back to ZBasic is it lack of Data structures, but this is
made up for the use of Indexes. C programmer salivate all over the place
at the mention of theses babies. They give you performance you never dreamed
of. Now of we could just get Zedcor to give us a dozen more, WOW.
Moral of the story - DO NOT EVER underestimate the POWER of Compiled Basic.
Have at it. I hope a lot of people will use this as a jumping off point
and dive into creating a flood of new SS/Tabby utilities.
I can be reached on the networks if you have questions.
614-471-6209 9600 baud
614-471-5733 2400 baud
M.Lininger Genie
Mike Lininger FidoNet (Tabby, RRH, MANSION echoes)
Mike Lininger 1:226/200
Mike Lininger via cmhGate - Net 226 fido<=>uucp gateway Col, OH
UUCP: ...!ous-cis!n8emr!cmhgate!200.2!Mike.Lininger
INET: Mike.Lininger@p2.f200.n226.z1.FIDONET.ORG
' This is 1.0 release code. 3.2 is still sharware see end of this code
' for details on Mantissa 3.2
' Code is in ZBasic 5.0
' Settings 8,2,4,5,50,mklt,TEXT,LONG,Space Req. after Keywords
'
' Start date: 02-08-89
' Last modify date: 03-08-90
' Version: 1.0
' Message Base management system for RRH and Tabby
' Creator: MKLm
' Type: Mtsa
' To Prevent your application from say "You will not be able to print"
' if it does not find a Print Driver in your system do the following
' on the finial campiled application. DO NOT DO IT ON ZBASIC ITSELF.
' Use FEDIT do a Hex search for 50EDFD3C and change 50ED to FD3C.
' Sets up application. Turns off Startup Window, Sets Default Mouse
WINDOW OFF
COORDINATE WINDOW
DEF MOUSE=-1
WIDTH -2
FLUSHEVENTS
DIM T%,L%,B%,R%,MY%,MX%: ' Required for Toolbox calls
DIM 80 Tabby$(100)
DIM 25 MsgName$(255): ' Storage area for Message Base Section Names
DIM SectionLimit%(255): ' Storage area for Message section limits
DIM SectionCount%(255): ' Storage area for Active Msg Section counts
DIM SectionDay%(255): ' Storage area for Message Day Limit
DIM SectionDelete%(255): ' Storage area for deleted message counts
DIM 1 MsgType$(255):
DIM 1 MessageSection$(255):
DIM 1 Backup$(255):
RRHost$="Red Ryder Host"
Memory&=MEM(-1)
a&=82400
b&=128000
c&=9242
LONG IF a&+b&+c&+20000 > Memory&
a&=41200
b&=64000
LONG IF a&+b&+c&+20000 > Memory&
a&=20600
b&=32000
LONG IF a&+b&+c&+20000 > Memory&
a&=10300
b&=16000
LONG IF a&+b&+c&+20000 > Memory&
a&=5150
b&=8000
LONG IF a&+b&+c&+20000 > Memory&
ErrLine$="*** Not Enough Memory *** "
GOSUB "Error Log"
ErrLine$="*** Minimum Memory Needed:"+STR$(a&+b&+c&+10000) +" *** "
GOSUB "Error Log"
ErrLine$="*** Max Memory Available:"+STR$(Memory&)+" *** "
GOSUB "Error Log"
GOSUB "Get_Resource_Values"
NextLaunch$=BBSFolder$+"Launch.Next"
TabbyNet$=BBSFolder$+"TabbyNet"
RRHost$=BBSFolder$+RRHost$
GOSUB "Tabby_Launch"
ErrLine$ = "<<Error MM>> Everything Failed to Launch, Dropping to Finder, Memory Problems! "
GOSUB "Error Log"
END
END IF
END IF
END IF
END IF
ErrLine$="*** Low on Memory, Cache Size Reduced, so is performance! "+STR$(Memory&)
GOSUB "Error Log"
END IF
CLEAR a&,0
CLEAR b&,1
CLEAR c&,2
Field%=1:ERROR=0:Cur%=128
Start&=TIMER
' Initialize all need variables
FOR j%=1 TO 255
SectionLimit%(j%)=999
SectionCount%(j%)=0
SectionDelete%(j%)=0
SectionDay%(j%)=365
MsgName$(j%)=""
NEXT j%
' Initialize Tabby$() to null's
FOR j% = 1 TO 100
Tabby$(j%)=""
NEXT j%
' This function turns a Pascal-encoded string into ZBasic-usable form
DEF FN MakeString$(String$) = MID$(String$, 2, ASC(LEFT$(String$,1)))
' convert string resource to a string, handle must be passed to this function
LONG FN ReturnString$(SHndl&)
FByte%=PEEK(PEEK LONG(SHndl&))
String$=""
FOR I%=1 TO FByte%
String$=String$+CHR$(PEEK(PEEK LONG(SHndl&)+I%))
NEXT I%
END FN = String$
' Builds main process window
GOSUB "Get_Resource_Values"
GOSUB "Cursor_Spin"
' Checks to see if mouse key is down, if so then goto configure menu
MOUSE ON
DEF MOUSE = 0
Hold%=MOUSE(3)
LONG IF Hold% <> 0
GOSUB "Cursor_Spin"
DEF MOUSE = -1
WINDOW CLOSE #1
GOSUB "Configure Menu"
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
END
END IF
MOUSE OFF
DEF MOUSE = -1
WINDOW 2,"",(120,57)-(370,290),2
MENU 1,0,1,"File"
EDIT MENU 2
MENU 3,0,0,"Aurora Borealis 614-471-6209"
'RefNum%=FN OPENRESFILE("dd80:ZBasic:Mantissa.pict")
Pict&=FN GETRESOURCE(CVI("PICT"),24610)
PICTURE(120,0),Pict&
T%=127:L%=47:B%=159:R%=79
CALL PLOTICON(T%,FN GETICON(257))
TEXT 3,9,0,0
T%=164:L%=7:B%=180:R%=120:TEMP$="by"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 1)
TEXT 0,12,0,0
T%=184:L%=7:B%=200:R%=120:TEMP$="Michael Lininger"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 1)
T%=210:L%=7:B%=226:R%=120:TEMP$="•••••••••••••••"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 1)
GOSUB "Cursor_Spin"
IF LEN(BBSFolder$) <= 1 THEN BBSFolder$=""
NextLaunch$=BBSFolder$+"Launch.Next"
TabbyNet$=BBSFolder$+"TabbyNet"
RRHost$=BBSFolder$+RRHost$
ConfigFile$=BBSFolder$+"Config"
IF RRHost$="" THEN RRHost$="Red Ryder Host"
GOSUB "Config_Read"
GOSUB "Cursor_Spin"
GOSUB "Messages_Read"
IF LEN(Archive$) <= 1 THEN Archive$=MsgPath$+":"
CALL PENNORMAL
CIRCLE 60,50,44
PEN 2,2,,,
CIRCLE 60,50,40
PEN,,1,9,3
ScreenLine$="* Delete Scan *"
GOSUB "Screen_Log_Display"
MsgHdrBak$=MsgHdrFilename$+".$$$"
MsgTxtBak$=MsgTxtFilename$+".$$$"
MessageBak$=MessagesFile$+".$$$"
MsgHdrTemp$=MsgHdrFilename$+".tmp"
HdrBak$=MsgHdrFilename$+".bak"
TxtBak$=MsgTxtFilename$+".bak"
MsgBak$=MessagesFile$+".bak"
GOSUB "Cursor_Spin"
ON ERROR GOSUB "SystemFile_Error"
ErrLine$="<<Error HB1>> *":ErName$=HdrBak$
OPEN "N",1,HdrBak$
ErrLine$="<<Error HB1-1>> *"
CLOSE #1
ErrLine$="<<Error HB1-2>> *"
KILL HdrBak$
ErrLine$="<<Error TB1>> *":ErName$=TxtBak$
OPEN "N",1,TxtBak$
ErrLine$="<<Error TB1-1>> *"
CLOSE #1
ErrLine$="<<Error TB1-2>> *"
KILL TxtBak$
ErrLine$="<<Error MB1>> *":ErName$=MsgBak$
OPEN "N",1,MsgBak$
ErrLine$="<<Error MB1-1>> *"
CLOSE #1
ErrLine$="<<Error MB1-2>> *"
KILL MsgBak$
ErrLine$="<<Error S1>> *":ErName$=Settings$
OPEN "I",1,Settings$
WHILE NOT EOF(1)
ErrLine$="<<Error S1-1>> *"
LINE INPUT #1,line$
LONG IF LEFT$(line$,1) <> "*"
SecA%=VAL(LEFT$(line$,3))
DayB%=VAL(MID$(line$,5,3))
LimitC%=VAL(MID$(line$,9,3))
SectionLimit%(SecA%)=LimitC%
SectionDay%(SecA%)=DayB%
Backup$(SecA%)=MID$(line$,13,1)
END IF
WEND
CLOSE #1
GOSUB "Cursor_Spin"
date$=DATE$
Day%=VAL(MID$(date$,4,2))
Month%=VAL(LEFT$(date$,2))
Year%=VAL(RIGHT$(date$,2))
Today&=(365*Year%)+(30.5*Month%)+Day%
ErrLine$="<<Error H1>> *":ErName$=MsgHdrFilename$
OPEN "N",1,MsgHdrFilename$
R_MsgCount&=a&
R_MsgLength&=LOF(1,1)
LONG IF R_MsgLength& < R_MsgCount&
R_MsgCount&=R_MsgLength&
END IF
GOSUB "Cursor_Spin"
Position&=R_MsgLength&-R_MsgCount&
IF Position& < 0 THEN Position&=0:Full%=1
BytesLeft&=R_MsgLength&
Loop%=0
ErrLine$="<<Error TT1>> *":ErName$=MsgTxtFilename$
OPEN "N",12,MsgTxtFilename$
DEF OPEN "MSGSMGED"
ErrLine$="<<Error HT1>> *":ErName$=MsgHdrTemp$
OPEN "N",2,MsgHdrTemp$
WHILE Loop%=0
GOSUB "Cursor_Spin"
ErrLine$="<<Error H2>> *":ErName$=MsgHdrFilename$
RECORD #1,0,Position&
ErrLine$="<<Error H2-2>> *"
READ FILE #1,MEM(0+40),R_MsgCount&
TotalBytes&=TotalBytes&+R_MsgCount&
RecordCount%=R_MsgCount&/206
x&=R_MsgCount&-206
FOR j%=1 TO RecordCount%
GOSUB "Cursor_Spin"
Status$=CHR$(PEEK(MEM(0+40)+x&))
Section%=CVI(CHR$(PEEK(MEM(0+40)+x&+6)))
Day%=CVI(CHR$(PEEK(MEM(0+40)+x&+9)))
Month%=CVI(CHR$(PEEK(MEM(0+40)+x&+8)))
Year%=CVI(CHR$(PEEK(MEM(0+40)+x&+10)))
DayResult&=(365*Year%)+(30.5*Month%)+Day%
LONG IF ((ASC(Status$) AND 1) = 1)
UserDelete&=UserDelete&+1
SectionDelete%(Section%)=SectionDelete%(Section%)+1
LONG IF Backup$(Section%) = "1"
BPtr&=x&
GOSUB "Backup_Message"
END IF
GOTO "Delete_Skip"
END IF
LONG IF SectionDay%(Section%) > 0
LONG IF DayResult& < Today&-SectionDay%(Section%) AND b3%=2 OR SectionCount%(Section%) >= SectionLimit%(Section%) AND b4%=2
LONG IF DayResult& < Today&-SectionDay%(Section%) AND b3%=2
DayDelete&=DayDelete&+1
XELSE
LimitDelete&=LimitDelete&+1
END IF
Status%=ASC(Status$)
Status%=Status%+1
POKE MEM(0+40)+x&,Status%
SectionDelete%(Section%)=SectionDelete%(Section%)+1
LONG IF Backup$(Section%) = "1"
BPtr&=x&
GOSUB "Backup_Message"
END IF
GOTO "Delete_Skip"
END IF
END IF
SectionCount%(Section%)=SectionCount%(Section%)+1
Active%=Active%+1
"Delete_Skip"
x&=x&-206
NEXT j%
ErrLine$="<<Error HT2>> *":ErName$=MsgHdrTemp$
RECORD #2,0,Position&
ErrLine$="<<Error HT2-2>> *"
WRITE FILE #2,MEM(0+40),R_MsgCount&
Position&=Position&-R_MsgCount&
BytesLeft&=BytesLeft&-R_MsgCount&
IF Full%=1 THEN Loop%=1
LONG IF Full%=0
IF BytesLeft&-R_MsgCount& < 0 THEN Full%=1:R_MsgCount&=BytesLeft&:Position&=0
END IF
GOSUB "Cursor_Spin"
radii%=40*TotalBytes&/R_MsgLength&
CIRCLE FILL 60,50,radii%
WEND
ErrLine$="<<Error H2-3>> *":ErName$=MsgHdrFilename$
CLOSE #1
ErrLine$="<<Error HT2-3>> *":ErName$=MsgHdrTemp$
CLOSE #2
ErrLine$="<<Error TT1-3>> *":ErName$=MsgTxtFilename$
CLOSE #12
RESET
GOSUB "Cursor_Spin"
CALL PENNORMAL
ScreenLine$="* Backup Scan *"
GOSUB "Screen_Log_Display"
R_MsgPosition&=0
R_MsgCount&=a&
R_MsgLength&=0
N_MsgPosition&=0
N_TotalBytes&=0
LowMessage&=0
Position&=0
NewPosition&=0
Active%=0
Delete%=0
ErrLine$="<<Error HT3>> *":ErName$=MsgHdrTemp$
OPEN "N",1,MsgHdrTemp$
ErrLine$="<<Error T1>> *":ErName$=MsgTxtFilename$
OPEN "N",3,MsgTxtFilename$
DEF OPEN "MSGSMGED"
ErrLine$="<<Error HB2>> *":ErName$=MsgHdrBak$
OPEN "N",2,MsgHdrBak$
ErrLine$="<<Error TB2>> *":ErName$=MsgTxtBak$
OPEN "N",4,MsgTxtBak$
GOSUB "Cursor_Spin"
R_MsgLength&=LOF(1,1)
LONG IF R_MsgLength& < R_MsgCount&
R_MsgCount&=R_MsgLength&
END IF
OldPosition&=0
NewPosition&=0
Counter&=0
TxtBytes&=0
HighMessage&=0
LowMessage&=0
N_TotalBytes&=0
WHILE NOT EOF(1)
GOSUB "Cursor_Spin"
ErrLine$="<<Error HT4>> *":ErName$=MsgHdrTemp$
RECORD #1,0,R_MsgPosition&
ErrLine$="<<Error HT4-2>> *"
READ FILE #1,MEM(0+40),R_MsgCount&
RecordCount%=R_MsgCount&/206
x&=0
FOR j%=1 TO RecordCount%
GOSUB "Cursor_Spin"
Status$=CHR$(PEEK(MEM(0+40)+x&))
Day%=CVI(CHR$(PEEK(MEM(0+40)+x&+9)))
Month%=CVI(CHR$(PEEK(MEM(0+40)+x&+8)))
Year%=CVI(CHR$(PEEK(MEM(0+40)+x&+10)))
DayResult&=(365*Year%)+(30.5*Month%)+Day%
LONG IF ((ASC(Status$) AND 1) = 1)
Delete%=Delete%+1
GOSUB "File_Dump"
TxtBytes&=0
BytesWritten&=0
OldPosition&=OldPosition&+PEEK LONG (MEM(0+40)+x&+192)
' take into account length of deleted message
XELSE
MessageNumber& = PEEK LONG(MEM(0+40)+x&+2)
OFFSet&=PEEK LONG(MEM(0+40)+x&+188)
MsgBytes&=PEEK LONG(MEM(0+40)+x&+192)
HighMessage&=MessageNumber&
IF LowFlag%=0 THEN LowFlag%=1:LowMessage&=MessageNumber&
TxtBytes&=TxtBytes&+MsgBytes&
Active%=Active%+1
xx&=MEM(0+40)+x&+188
POKE LONG xx&,N_TotalBytes&
OFFSet&=PEEK LONG(MEM(0+40)+x&+188)
ErrLine$="<<Error HB3>> *":ErName$=MsgHdrBak$
RECORD #2,0,N_MsgPosition&
xy&=MEM(0+40)+x&
ErrLine$="<<Error HB3-2>> *"
WRITE FILE #2,xy&,206
N_TotalBytes&=N_TotalBytes&+MsgBytes&
N_MsgPosition&=N_MsgPosition&+206
END IF
x&=x&+206
NEXT j%
GOSUB "Cursor_Spin"
radii%=40*R_MsgPosition&/R_MsgLength&
CIRCLE FILL 60,50,radii%
R_MsgPosition&=R_MsgPosition&+R_MsgCount&
LONG IF R_MsgPosition&+R_MsgCount& > R_MsgLength&
aHold& = R_MsgLength&-R_MsgPosition&
R_MsgCount&=aHold&
END IF
WEND
GOSUB "File_Dump"
ErrLine$="<<Error HT3-C>> *":ErName$=MsgHdrTemp$
CLOSE #1
ErrLine$="<<Error HB2-C>> *":ErName$=MsgHdrBak$
CLOSE #2
ErrLine$="<<Error T1-C>> *":ErName$=MsgTxtFilename$
CLOSE #3
ErrLine$="<<Error TB2-C>> *":ErName$=MsgTxtBak$
CLOSE #4
RESET
POKE LONG MEM(2+40)+50,LowMessage&
POKE LONG MEM(2+40)+54,HighMessage&
POKE LONG MEM(2+40)+58,N_TotalBytes&
ErrLine$="<<Error MB3>> *":ErName$=MessageBak$
OPEN "N",6,MessageBak$
ErrLine$="<<Error MB3-2>> *"
WRITE FILE #6,MEM(2+40),9242
CLOSE #6
RESET
GOSUB "Cursor_Spin"
ErrLine$="<<Error HT5>> *":ErName$=MsgHdrTemp$
OPEN "N",1,MsgHdrTemp$
ErrLine$="<<Error HT5-C>> *"
CLOSE #1
RESET
ErrLine$="<<Error HT5-2>> *"
KILL MsgHdrTemp$
ErrLine$="<<Error R1>> *":ErName$="Rename Error"
RENAME MsgHdrFilename$,HdrBak$
ErrLine$="<<Error R2>> *"
RENAME MsgTxtFilename$,TxtBak$
ErrLine$="<<Error R3>> *"
RENAME MessagesFile$,MsgBak$
ErrLine$="<<Error R4>> *"
RENAME MsgHdrBak$,MsgHdrFilename$
ErrLine$="<<Error R5>> *"
RENAME MsgTxtBak$,MsgTxtFilename$
ErrLine$="<<Error R6>> *"
RENAME MessageBak$,MessagesFile$
ON ERROR RETURN
GOSUB "Cursor_Spin"
ScreenLine$="* Build File *"
DEF OPEN "TEXTEDIT"
ErrLine$="<<Error L0>> *":ErName$=Report$
ON ERROR GOSUB "SystemFile_Error"
OPEN "O",9,Report$
GOSUB "Cursor_Spin"
ErrLine$="<<Error L1>> *"
PRINT #9," "
PRINT #9," Mantissa, by Mike Lininger"
xhold$=STR$(TIMER-Start&)
Sec$="."+RIGHT$(xhold$,LEN(xhold$)-1)
MantissaTime&=TIMER-Start&
PRINT #9," Date: ";DATE$;" Time: ";TIME$;Sec$
PRINT #9," Limits"
PRINT #9," Message Section Active Deletes Days Section"
PRINT #9," ------------------------------------------------------------------"
Active&=0:Delete&=0:SectionTotal&=0
GOSUB "Cursor_Spin"
FOR j%=1 TO 255
GOSUB "Cursor_Spin"
LONG IF MsgName$(j%) <> ""
LONG IF LEFT$(MsgName$(j%),3) = "---"
a$=RIGHT$(MsgName$(j%),LEN(MsgName$(j%))-3)
a$=a$+SPACE$(25)
XELSE
a$=MsgName$(j%)+SPACE$(25)
END IF
a$=LEFT$(a$,25)
PRINT #9, " ";
PRINT #9, USING "###";j%;
PRINT #9, ". ";a$;
PRINT #9, USING "#,###,###";SectionCount%(j%);:Active&=Active&+SectionCount%(j%)
PRINT #9, USING "#,###,###";SectionDelete%(j%);:Delete&=Delete&+SectionDelete%(j%)
PRINT #9, USING "#,###,###";SectionDay%(j%);
PRINT #9, USING "#,###,###";SectionLimit%(j%)
SectionTotal&=SectionTotal&+SectionLimit%(j%)
END IF
NEXT j%
PRINT #9,SPACE$(32);:PRINT #9," -------- -------- --------"
PRINT #9,SPACE$(24);:PRINT #9,"Totals: ";:PRINT #9,USING "#,###,###";Active&;:PRINT #9,USING "#,###,###";Delete&;
PRINT #9,SPACE$(9);:PRINT #9,USING "#,###,###";SectionTotal&
PRINT #9,SPACE$(41);:PRINT #9,USING "#,###,###";UserDelete&;:PRINT #9," - User +"
PRINT #9,SPACE$(41);:PRINT #9,USING "#,###,###";DayDelete&;:PRINT #9," - Day | Deletes "
PRINT #9,SPACE$(41);:PRINT #9,USING "#,###,###";LimitDelete&;:PRINT #9," - Limit + "
PRINT #9," "
PRINT #9,SPACE$(25);:PRINT #9," Low Message: ";:PRINT #9,USING "########";LowMessage&
PRINT #9,SPACE$(25);:PRINT #9," High Message: ";:PRINT #9,USING "########";HighMessage&
PRINT #9,SPACE$(25);:PRINT #9," Archived Msgs: ";:PRINT #9,USING "########";Archive%
PRINT #9,SPACE$(25);:PRINT #9," MsgTxt Size: ";:PRINT #9,USING "########";N_TotalBytes&;:PRINT #9," bytes"
PRINT #9,SPACE$(25);:PRINT #9," MsgHdr Size: ";:PRINT #9,USING "########";N_MsgPosition&;:PRINT #9," bytes"
H&=VARPTR(TEMP$):POKE LONG H&+12,0:I&=VARPTR(A$):POKE LONG H&+18,I&
POKE WORD H&+22,0:POKE WORD H&+28,0:GET VOLUME INFO TEMP$
H1&=PEEK LONG(H&+48):X&=PEEK WORD(H&+62)
IF X& < 0 THEN X&=X&+65535
H2&=(H1&*X&)/1024
PRINT #9,SPACE$(25);:PRINT #9,"Free Disk Space: ";:PRINT #9,USING "########";H2&;:PRINT #9," k"
PRINT #9,SPACE$(25);:PRINT #9," Free Memory: ";:PRINT #9,USING "########";MEM(-1);:PRINT #9," bytes"
PRINT #9,SPACE$(25);:PRINT #9," Run Time: ";:PRINT #9,USING "########";MantissaTime&;:PRINT #9," seconds"
CLOSE #9
RESET
ON ERROR RETURN
GOSUB "Cursor_Spin"
"Update_Skip"
LONG IF b5%=2
Start&=TIMER
FOR j%= 1 TO 255
SectionLimit%(j%)=0
SectionCount%(j%)=0
NEXT j%
R_MsgPosition&=0
ScreenLine$="* ..scanning.. *"
GOSUB "Screen_Log_Display"
ErrLine$="<<Error H1>> *":ErName$=MsgHdrFilename$
ON ERROR GOSUB "SystemFile_Error"
OPEN "N",1,MsgHdrFilename$
ON ERROR RETURN
GOSUB "Cursor_Spin"
R_MsgLength&=LOF(1,1)
R_MsgCount&=a&
LONG IF R_MsgLength& < R_MsgCount&
R_MsgCount&=R_MsgLength&
END IF
WHILE NOT EOF(1)
GOSUB "Cursor_Spin"
ErrLine$="<<Error H2>> *":ErName$=MsgHdrFilename$
ON ERROR GOSUB "SystemFile_Error"
RECORD #1,0,R_MsgPosition&
ErrLine$="<<Error H2-2>> *"
READ FILE #1,MEM(0+40),R_MsgCount&
ON ERROR RETURN
RecordCount%=R_MsgCount&/206
x&=0
FOR j%=1 TO RecordCount%
MessageNumber& = PEEK LONG(MEM(0+40)+x&+2)
MessageSection%=CVI(CHR$(PEEK(MEM(0+40)+x&+6)))
x&=x&+206
LONG IF MessageNumber& > OldMessageNumber&
SectionCount%(MessageSection%)=SectionCount%(MessageSection%)+1
END IF
SectionLimit%(MessageSection%)=SectionLimit%(MessageSection%)+1
NEXT j%
R_MsgPosition&=R_MsgPosition&+R_MsgCount&
LONG IF R_MsgPosition&+R_MsgCount& > R_MsgLength&
aHold& = R_MsgLength&-R_MsgPosition&
R_MsgCount&=aHold&
END IF
WEND
ErrLine$="<<Error H3>> *":ErName$=MsgHdrFilename$
ON ERROR GOSUB "SystemFile_Error"
CLOSE #1
RESET
ON ERROR RETURN
GOSUB "Cursor_Spin"
ScreenLine$="* Build File *"
DEF OPEN "TEXTEDIT"
ErrLine$="<<Error E0>> *":ErName$=SysMsgName$
ON ERROR GOSUB "SystemFile_Error"
OPEN "O",9,SysMsgName$
ErrLine$="<<Error E1>> *":ErName$=SysMsgName$
PRINT #9," "
PRINT #9," New Messages Delivered/Added Overnight! Epistle IIm, by Mike Lininger"
xhold$=STR$(TIMER-Start&)
Sec$="."+RIGHT$(xhold$,LEN(xhold$)-1)
PRINT #9," Date: ";DATE$;" Time: ";TIME$;Sec$
PRINT #9," "
PRINT #9," Message Section New Msgs Total Msgs Message Type"
PRINT #9," -----------------------------------------------------------------------"
FOR j%=1 TO 255
LONG IF MsgName$(j%) <> "" AND LEFT$(MsgName$(j%),3) <> "---"
a$=MsgName$(j%)+SPACE$(25)
a$=LEFT$(a$,25)
PRINT #9, " ";
PRINT #9, USING "###";j%;
PRINT #9, ". ";a$;
PRINT #9, USING "##,###,###";SectionCount%(j%);
PRINT #9, USING "#,###,###,###";SectionLimit%(j%);
PRINT #9, " ";
IF MsgType$(j%)="1" THEN MessageType$=" Local Private**"
IF MsgType$(j%)="2" THEN MessageType$=" Local Mail Area"
IF MsgType$(j%)="3" THEN MessageType$=" NetMail Private"
IF MsgType$(j%)="4" THEN MessageType$=" *Echo Mail Area"
PRINT #9, MessageType$
END IF
NEXT j%
ErrLine$="<<Error E2>> *":ErName$=SysMsgName$
CLOSE #9
RESET
ON ERROR RETURN
GOSUB "Cursor_Spin"
' Updates the high message #, that was last processed by this routine
' Write new High Message Number to STR 1889 in STR Resource.
ScreenLine$="* Update Msg # *"
GOSUB "Screen_Log_Display"
GOSUB "Cursor_Spin"
default$=STR$(MessageNumber&)
default$=RIGHT$(default$,LEN(default$)-1)
ResourceCount%=1899
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
END IF
GOSUB "Cursor_Spin"
GOSUB "Tabby_Launch"
ErrLine$ = "<<Error 00>> Everything Failed to Launch, Dropping to Finder "
GOSUB "Error Log"
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
"File_Dump"
LONG IF TxtBytes& > 0
Last&=64000
Loop%=0:Full%=0
IF TxtBytes& < Last& THEN Full%=1:Last& = TxtBytes&
WHILE Loop%=0
GOSUB "Cursor_Spin"
ON ERROR GOSUB "SystemFile_Error"
ErrLine$="<<Error T2>> *":ErName$=MsgTxtFilename$
RECORD #3,0,OldPosition&
ErrLine$="<<Error T2-2>> *"
READ FILE #3,MEM(1+40),Last&
ErrLine$="<<Error TB3>> *":ErName$=MsgTxtBak$
RECORD #4,0,NewPosition&
ErrLine$="<<Error TB3-2>> *"
WRITE FILE #4,MEM(1+40),Last&
ON ERROR RETURN
BytesWritten&=BytesWritten&+Last&
OldPosition&=OldPosition&+Last&
NewPosition&=NewPosition&+Last&
IF Full%=1 THEN Loop%=1
LONG IF Full%=0
IF BytesWritten&+Last& > TxtBytes& THEN Full%=1:Last&=TxtBytes&-BytesWritten&
END IF
WEND
END IF
GOSUB "Cursor_Spin"
RETURN
"Backup_Message"
GOSUB "Cursor_Spin"
To$="":From$="":Subject$=""
l%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+46)))
FOR k%=1 TO l%
To$=To$+CHR$(PEEK(MEM(0+40)+BPtr&+46+k%))
NEXT k%
l%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+14)))
FOR k%=1 TO l%
From$=From$+CHR$(PEEK(MEM(0+40)+BPtr&+14+k%))
NEXT k%
l%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+78)))
FOR k%=1 TO l%
Subject$=Subject$+CHR$(PEEK(MEM(0+40)+BPtr&+78+k%))
NEXT k%
d1%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+8)))
d2%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+9)))
d3%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+10)))
t1%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+11)))
t2%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+12)))
t3%=CVI(CHR$(PEEK(MEM(0+40)+BPtr&+13)))
d1$=RIGHT$(STR$(d1%),LEN(STR$(d1%))-1)
d2$=RIGHT$(STR$(d2%),LEN(STR$(d2%))-1)
d3$=RIGHT$(STR$(d3%),LEN(STR$(d3%))-1)
t1$=RIGHT$(STR$(d1%),LEN(STR$(d1%))-1)
t2$=RIGHT$(STR$(t2%),LEN(STR$(t2%))-1)
t3$=RIGHT$(STR$(t3%),LEN(STR$(t3%))-1)
tm$=t1$+":"+t2$+":"+t3$
dt$=d1$+"/"+d2$+"/"+d3$
Reply%=0:ReplyMsgNumber&=0
Status$=CHR$(PEEK(MEM(0+40)+BPtr&))
LONG IF (ASC(Status$) AND 8) = 8
ReplyMsgNumber&=PEEK LONG(MEM(0+40)+BPtr&+196)
Reply%=255
END IF
MsgNumber&=PEEK LONG(MEM(0+40)+BPtr&+2)
MessageOffSet&=PEEK LONG(MEM(0+40)+BPtr&+188)
MsgLength&=PEEK LONG(MEM(0+40)+BPtr&+192)
l%=LEN(MsgName$(Section%))
IF l%=0 THEN RETURN
LONG IF LEFT$(MsgName$(Section%),3) = "---"
SectionName$=RIGHT$(MsgName$(Section%),LEN(MsgName$(Section%))-3)
l%=LEN(SectionName$)
IF l% > 25 THEN l%=25
XELSE
SectionName$=MsgName$(Section%)
l%=LEN(SectionName$)
IF l% > 25 THEN l%=25
END IF
SectionName$=LEFT$(SectionName$,l%)
nm$=Archive$+SectionName$+".txt"
ON ERROR GOSUB "Backup_Error"
ErrLine$="<<Error BK2-1>> *":ErName$=nm$
DEF OPEN "TEXTEDIT"
OPEN "A",11,nm$
IF BError%=255 THEN GOTO "BackupEnd"
PRINT #11," To: ";To$;CHR$(13);
PRINT #11," From: ";From$;CHR$(13);
PRINT #11,"Subject: ";Subject$;CHR$(13);
PRINT #11," Date: ";dt$;" - ";tm$;CHR$(13);
PRINT #11," Area: ";SectionName$;CHR$(13);
PRINT #11," Msg #:";:PRINT #11,USING "########";MsgNumber&;
LONG IF Reply%=255
PRINT #11, " [Reply] to Msg #:";:PRINT #11, USING "########";ReplyMsgNumber&;CHR$(13);
XELSE
PRINT #11,CHR$(13);
END IF
PRINT #11,CHR$(13);
MessageSize&=MessageOffSet&
WHILE MessageSize& < MessageOffSet&+MsgLength&
ErrLine$="<<Error BK2-2>> *":ErName$=MsgTxtFilename$
RECORD #12,0,MessageSize&
IF BError%=255 THEN GOTO "BackupEnd"
ErrLine$="<<Error BK2-3>> *"
READ #12,Temp$;1
IF BError%=255 THEN GOTO "BackupEnd"
l%=ASC(Temp$)
ErrLine$="<<Error BK2-4>> *"
READ #12,Msgline$;l%
IF BError%=255 THEN GOTO "BackupEnd"
ErrLine$="<<Error BK2-5>> *":ErName$=nm$
PRINT #11,Msgline$;CHR$(13);
IF BError%=255 THEN GOTO "BackupEnd"
MessageSize&=MessageSize&+1+l%
WEND
ErrLine$="<<Error BK2-6>> *":ErName$=nm$
PRINT #11,CHR$(0)+CHR$(13);
Archive%=Archive%+1
"BackupEnd"
ErrLine$="<<Error BK2-6>> *"
CLOSE #11
BError%=0
ON ERROR RETURN
GOSUB "Cursor_Spin"
RETURN
"Backup_Error"
ErrLine$=ErrLine$+ErName$+"* Error"+STR$(ERROR)+" Invalid Name/Path, Missing, In Use, or Damaged"
GOSUB "Error Log"
ErrLine$="Message: "+ERRMSG$(ERROR)
GOSUB "Error Log"
ERROR=0:BError%=255
RETURN
"Config_Read"
ScreenLine$="* config. load *"
GOSUB "Screen_Log_Display"
ErrLine$="<<Error C0>> *":ErName$=ConfigFile$
ON ERROR GOSUB "SystemFile_Error"
OPEN "N",1,ConfigFile$
Length&=LOF(1,1)
LONG IF Length&=0
ErrLine$="<<Error C1>> *":ErName$=ConfigFile$
GOSUB "SystemFile_Error"
XELSE
ErrLine$="<<Error C2>> *":ErName$=ConfigFile$
RECORD #1,0,139
READ #1, MsgPath$;80
ErrLine$="<<Error C3>> *":ErName$=ConfigFile$
CLOSE #1
RESET
ON ERROR RETURN
LONG IF ASC(LEFT$(MsgPath$,1))>0
MessagesFile$=FN MakeString$(MsgPath$)+":MESSAGES"
XELSE
MessagesFile$=BBSFolder$+"MESSAGES": ' Default location
END IF
END IF
RETURN
"SystemFile_Error"
RESET
ErrLine$=ErrLine$+ErName$+"* Error"+STR$(ERROR)+" * - Invalid Name/Path, In Use, Missing, or Damaged! "
GOSUB "Error Log"
ErrLine$="Message: "+ERRMSG$(ERROR)
GOSUB "Error Log"
ERROR=0
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
GOSUB "Tabby_Launch"
ErrLine$ = " *??* That is it folks, I am confuzzzzzed dropping to Finder *** "
GOSUB "Error Log"
ScreenLine$="* Drop Finder *"
GOSUB "Screen_Log_Display"
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
RETURN
"Messages_Read"
ScreenLine$="* message load *"
GOSUB "Screen_Log_Display"
ErrLine$="<<Error M0>> *":ErName$=MessagesFile$
ON ERROR GOSUB "SystemFile_Error"
OPEN "N",5,MessagesFile$
ErrLine$="<<Error M1>> *":ErName$=MessagesFile$
RECORD #5,0,0
READ FILE #5,MEM(2+40),9242
ErrLine$="<<Error M2>> *":ErName$=MessagesFile$
CLOSE #5
RESET
ON ERROR RETURN
MsgPath$=""
a%=CVI(CHR$(PEEK(MEM(2+40))))
FOR j%=1 TO a%
MsgPath$=MsgPath$+CHR$(PEEK(MEM(2+40)+j%))
NEXT j%
LowMessage&=PEEK LONG(MEM(2+40)+50)
HighMessage&=PEEK LONG(MEM(2+40)+54)
MsgTxtBytes&=PEEK LONG(MEM(2+40)+58)
x&=62
FOR j%=1 TO 255
SectionType%=CVI(CHR$(PEEK(MEM(2+40)+x&+35)))
LONG IF SectionType% > 0
a%=CVI(CHR$(PEEK(MEM(2+40)+x&)))
LONG IF a% > 0
FOR k%=1 TO a%
MsgName$(j%)=MsgName$(j%)+CHR$(PEEK(MEM(2+40)+x&+k%))
NEXT k%
END IF
MsgType$(j%)=RIGHT$(STR$(SectionType%),1)
MessageSection$(j%)=RIGHT$(STR$(SectionType%),1)
LONG IF b5%=2
SecurityLevel%=CVI(CHR$(PEEK(MEM(2+40)+x&+26)))
LONG IF SecurityLevel% > Clearance%
MsgName$(j%)="---"+MsgName$(j%)
END IF
END IF
XELSE
MsgName$(j%)=""
END IF
x&=x&+36
NEXT j%
MsgHdrFilename$=MsgPath$+":"+"MSGHDR": ' Path to MSGHDR file
MsgTxtFilename$=MsgPath$+":"+"MSGTXT": ' Path to MSGHDR file
RETURN
"Get_Resource_Values"
' This module Gets default values from STR resources
' 1890 = BBS Application Name
' 1891 = Pathname To BBS Folder
' 1892 = Settings for Maintissa Text File
' 1893 = Report Log pathname
' 1894 = Delete by Day Y/N 2/1
' 1895 = Delete by Section Limit Y/N 2/1
' 1896 = Activate Epistle Y/N 2/1
' 1897 = Epistle Text File Name and Location
' 1898 = Clearance level for Epistle
' 1899 = Old High Message # for Epistle
' 1900 = Calls SystemTask (for tops and stuff) 2/1 On/Off
' 1901 = Pathname for archivial text files
' Find out what this application is named
CurApName=&H910
CurApName$=""
GOSUB "Cursor_Spin"
FOR I%=1 TO PEEK(CurApName)
CurApName$=CurApName$+CHR$(PEEK(CurApName+I%))
NEXT I%
rscs%=0:' ResFile is Closed
Refnum%=FN OPENRESFILE(CurApName$)
Errnum%=FN RESERROR
LONG IF Errnum% <> 0
ErrLine$ = "<<Error RS>> *":ErName$=CurApName$
GOSUB "SystemFile_Error"
END IF
rscs%=1:' ResFile is Open
FOR ResourceCount%=1890 TO 1901
GOSUB "Cursor_Spin"
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
LONG IF StrHnd&=0
' Setting up string resource to save default strs
IF ResourceCount% = 1890 THEN Str$="Red Ryder Host":RRHost$=Str$
IF ResourceCount% = 1891 THEN Str$=":":BBSFolder$=Str$
IF ResourceCount% = 1892 THEN Str$="Mantissa.data":Settings$=Str$
IF ResourceCount% = 1893 THEN Str$="Mantissa.log":Report$=Str$
IF ResourceCount% = 1894 THEN Str$="2":b3$=Str$:b3%=VAL(b3$)
IF ResourceCount% = 1895 THEN Str$="2":b4$=Str$:b4%=VAL(b4$)
IF ResourceCount% = 1896 THEN Str$="1":b5$=Str$:b5%=VAL(b5$)
IF ResourceCount% = 1897 THEN Str$="Epistle.msg":SysMsgName$=Str$
IF ResourceCount% = 1898 THEN Str$="0":Clearance$=Str$:Clearance%=0
IF ResourceCount% = 1899 THEN Str$="0":OldHighMessage$=Str$:OldHighMessage&=VAL(Str$)
IF ResourceCount% = 1900 THEN Str$="1":b6%=VAL(Str$)
IF ResourceCount% = 1901 THEN Str$=":":Archive$=Str$
StrHnd&=FN NEWSTRING(Str$)
CALL ADDRESOURCE (StrHnd&,CVI("STR "),ResourceCount%,"")
XELSE
StrHnd&=FN GETSTRING(ResourceCount%)
END IF
' Convert STRs into useful limit values and pathnames
Default$=FN ReturnString$(StrHnd&)
IF ResourceCount% = 1890 THEN RRHost$=Default$
IF ResourceCount% = 1891 THEN BBSFolder$=Default$
IF ResourceCount% = 1892 THEN Settings$=Default$
IF ResourceCount% = 1893 THEN Report$=Default$
IF ResourceCount% = 1894 THEN b3%=VAL(Default$)
IF ResourceCount% = 1895 THEN b4%=VAL(Default$)
IF ResourceCount% = 1896 THEN b5%=VAL(Default$)
IF ResourceCount% = 1897 THEN SysMsgName$=Default$
IF ResourceCount% = 1898 THEN Clearance$=Default$:Clearance%=VAL(Default$)
IF ResourceCount% = 1899 THEN OldMessageNumber$=Default$:OldMessageNumber&=VAL(Default$)
IF ResourceCount% = 1900 THEN b6%=VAL(Default$)
IF ResourceCount% = 1901 THEN Archive$=Default$
NEXT ResourceCount%
IF LEN(Archive$)=0 THEN Archive$=":"
LONG IF RIGHT$(Archive$,1) <> ":"
Archive$=Archive$+":"
END IF
GOSUB "Cursor_Spin"
RETURN
"Tabby_Launch"
RESET
GOSUB "Cursor_Spin"
EventCount%=0:ERROR=0
DEF OPEN "TEXTQED1"
ScreenLine$="* check launch *"
GOSUB "Screen_Log_Display"
GOSUB "Cursor_Spin"
ON ERROR GOSUB "Tabby_Launch_Error"
OPEN "N",1,NextLaunch$
Length&=LOF(1,1)
CLOSE #1
RESET
GOSUB "Cursor_Spin"
LONG IF Length&=0
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 01>> *"+NextLaunch$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = "<<Error K1a>> *:ErName$=NextLaunch$
KILL NextLaunch$
GOTO "Launch_Sequence_Start"
END IF
ScreenLine$="* load launch *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error L6>> *:ErName$=NextLaunch$
OPEN "I",2,NextLaunch$
ErrLine$ = "<<Error L6-1>> *
WHILE NOT EOF(2)
GOSUB "Cursor_Spin"
INPUT #2,Tabby$(EventCount%)
EventCount%=EventCount%+1
WEND
CLOSE #2
RESET
GOSUB "Cursor_Spin"
EventCount%=EventCount%-1
LONG IF EventCount% < 1
ScreenLine$="* delete launch *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error L6-3>> *
KILL NextLaunch$
XELSE
ScreenLine$="* update launch *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error L6-4>> *
OPEN "O",3,NextLaunch$
ErrLine$ = "<<Error L6-5a>> *
FOR Count%= 1 TO EventCount%
GOSUB "Cursor_Spin"
ErrLine$ = "<<Error L6-5b>> *
PRINT #3,Tabby$(Count%);
GOSUB "Cursor_Spin"
LONG IF Tabby$(Count%+1) = ""
ErrLine$ = "<<Error L6-5c>> *
PRINT #3,CHR$(13);
XELSE
ErrLine$ = "<<Error L6-5d>> *
PRINT #3,",";
END IF
NEXT Count%
ErrLine$ = "<<Error L6-6>> *
CLOSE #3
RESET
END IF
"Launch_Sequence_Start"
RESET
LaunchFile$=BBSFolder$+Tabby$(0)
IF UCASE$(Tabby$(0))="BBS" THEN LaunchFile$=RRHost$
GOSUB "Check_Valid_Filenames"
LONG IF Tabby$(0) <> ""
GOSUB "Cursor_Spin"
ScreenLine$="* launching *"
GOSUB "Screen_Log_Display"
CURSOR 0
LONG IF FileErr1%=255
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 02>> *"+LaunchFile$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+RRHost$+"* "
GOSUB "Error Log"
ScreenLine$="* launch BBS *"
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=0
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 03>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+TabbyNet$+"* "
GOSUB "Error Log"
ScreenLine$="* launch tabby *"
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="*file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 04>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " *** That is it folks, I am confuzzzzzed dropping to Finder *** "
GOSUB "Error Log"
ScreenLine$="* Drop Finder *"
GOSUB "Screen_Log_Display"
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
XELSE
RESET
RUN TabbyNet$
END
END IF
XELSE
RESET
RUN RRHost$
END
END IF
XELSE
RESET
RUN LaunchFile$
END
END IF
XELSE
CURSOR 0
ScreenLine$="* launch BBS *"
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=255
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 05>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *"+TabbyNet$+"* "
GOSUB "Error Log"
ScreenLine$="* launch tabby *"
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 06>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " *** That is it folks, I am dropping to Finder *** "
GOSUB "Error Log"
ScreenLine$="* Drop Finder *"
GOSUB "Screen_Log_Display"
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
XELSE
RESET
RUN TabbyNet$
END
END IF
XELSE
RESET
RUN RRHost$
END
END IF
END IF
CURSOR 0
ErrLine$ = "<<Error 99>> "+" Really Big ERROR, Sequence Abort, attempting to Recover "
GOSUB "Error Log"
ScreenLine$="* launch BBS *"
GOSUB "Screen_Log_Display"
LONG IF FileErr2%=255
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 07>> "+RRHost$+" Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " "+"Attempt is being Made to Run *TabbyNet* "
GOSUB "Error Log"
ScreenLine$="* launch tabby *"
GOSUB "Screen_Log_Display"
LONG IF FileErr3%=255
ScreenLine$="* file error *"
GOSUB "Screen_Log_Display"
ErrLine$ = "<<Error 08>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
GOSUB "Error Log"
ErrLine$ = " *** That is it folks, I am confuzzzzzzed @?$-&!#, dropping to Finder *** "
GOSUB "Error Log"
ScreenLine$="* Drop Finder *"
GOSUB "Screen_Log_Display"
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
XELSE
RESET
RUN TabbyNet$
END
END IF
RESET
RUN RRHost$
END
END IF
ON ERROR RETURN
RETURN
"Tabby_Launch_Error"
RESET
GOSUB "Cursor_Spin"
ErrLine$=ErrLine$+ErName$
GOSUB "Error Log"
ScreenLine$="* drop finder *"
GOSUB "Screen_Log_Display"
ErrLine$="<<Error"+STR$(ERROR)+">> Launch Error Possible Causes are as Follows: "
GOSUB "Error Log"
ErrLine$="Message: "+ERRMSG$(ERROR)
ERROR=0
GOSUB "Error Log"
ErrLine$="<<------- Report String - *"+Report$+"* "
GOSUB "Error Log"
ErrLine$="<<---------- BBS String - *"+RRHost$+"* "
GOSUB "Error Log"
ErrLine$="<<-- Launch.Next String - *"+NextLaunch$+"* "
GOSUB "Error Log"
ErrLine$="<<----- TabbyNet String - *"+TabbyNet$+"* "
GOSUB "Error Log"
ErrLine$="<<--- BBS Folder String - *"+BBSFolder$+"* "
GOSUB "Error Log"
ErrLine$="<<------- Config String - *"+ConfigFile$+"* "
GOSUB "Error Log"
ErrLine$="<<----- Messages String - *"+MessagesFile$+"* "
GOSUB "Error Log"
ErrLine$="<<------- MsgHdr String - *"+MsgHdrFilename$+"* "
GOSUB "Error Log"
ErrLine$="<<------- MsgTxt String - *"+MsgTxtFilename$+"* "
GOSUB "Error Log"
ErrLine$="<<--- Next Event String - *"+LaunchFile$+"* "
GOSUB "Error Log"
ErrLine$="<<------ Epistle String - *"+SysMsgName$+"* "
GOSUB "Error Log"
ErrLine$="<<-- One of the Above is Wrong! - Application Not There! - Invalid Pathname! - Can't Run A File! "
GOSUB "Error Log"
ErrLine$="* *** Dropping to Finder, I am Confuzzzzzzed @%?$-*$%! "
GOSUB "Error Log"
ERROR = 0
CURSOR 0
IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
RESET
END
RETURN
"Check_Valid_Filenames"
ErrFile%=0:FileErr1%=0:FileErr2%=0:FileErr3%=0
ON ERROR GOSUB "Filename_Error"
a%=1
OPEN "I",2,LaunchFile$
CLOSE #2
LONG IF FileErr1%=255
GOSUB "Cursor_Spin"
ErrLine$="<<Error 09>> *"+LaunchFile$+"* Next Event Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="* File Error *"
GOSUB "Screen_Log_Display"
END IF
a%=2
OPEN "I",2,RRHost$
CLOSE #2
LONG IF FileErr2%=255
GOSUB "Cursor_Spin"
ErrLine$="<<Error 10>> *"+RRHost$+"* BBS Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="* File Error *"
GOSUB "Screen_Log_Display"
END IF
a%=3
OPEN "I",2,TabbyNet$
CLOSE #2
LONG IF FileErr3%=255
GOSUB "Cursor_Spin"
ErrLine$="<<Error 11>> *"+TabbyNet$+"* TabbyNet Not Found - Invalid Name or Path "
GOSUB "Error Log"
ScreenLine$="* File Error *"
GOSUB "Screen_Log_Display"
END IF
ON ERROR RETURN
RETURN
"Filename_Error"
IF a%=1 THEN FileErr1%=255
IF a%=2 THEN FileErr2%=255
IF a%=3 THEN FileErr3%=255
ERROR=0
RETURN
"Screen_Log_Display"
GOSUB "Cursor_Spin"
TEXT 0,12,0,0
T%=100:L%=7:B%=116:R%=120:TEMP$=ScreenLine$
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 1)
GOSUB "Cursor_Spin"
RETURN
"Error Log"
GOSUB "Cursor_Spin"
DEF OPEN "TEXTTEps"
OPEN "A",7,"Mantissa.Error"
GOSUB "Cursor_Spin"
ErrLine$=ErrLine$+TIME$+" "+DATE$
PRINT #7, ErrLine$
CLOSE #7
GOSUB "Cursor_Spin"
RETURN
"Configure Menu"
Field%=1
CURSOR 0
GOSUB "Build Window"
ON DIALOG GOSUB "Handle Dialog"
DIALOG ON
"Loop"
LONG IF Button%=1
WINDOW CLOSE #1
RETURN
END IF
LONG IF Button%=2
GOSUB "Resource Update"
WINDOW CLOSE #1
RETURN
END IF
GOTO "Loop"
DIALOG OFF
"Handle Dialog"
Act%=DIALOG(0):Ref%=DIALOG(Act%)
IF Act%=3 THEN WINDOW Ref%:RETURN
LONG IF Act%=1 AND Ref%=1
Button%=2
END IF
LONG IF Act%=1 AND Ref%=2
Button%=1
END IF
LONG IF Act%=6 OR Act%=7
Field%=Field%+1
LONG IF b5%=1
IF Field%>4 THEN Field%=1
XELSE
IF Field%>7 THEN Field%=1
END IF
EDIT FIELD #Field%
END IF
LONG IF Act%=1 AND Ref%=3
LONG IF b3%=2
b3%=1
XELSE
b3%=2
END IF
BUTTON 3 ,b3%
END IF
LONG IF Act%=1 AND Ref%=4
LONG IF b4%=2
b4%=1
XELSE
b4%=2
END IF
BUTTON 4 ,b4%
END IF
LONG IF Act%=1 AND Ref%=5
LONG IF b5%=2
b5%=1
WINDOW 1,"",(55,43)-(427,280),2
T%=218:L%=4:B%=248:R%=272:PEN ,,,,19
CALL PAINTRECT(T%)
IF Field%>4 THEN Field%=1
EDIT FIELD #Field%
XELSE
b5%=2
WINDOW 1,"",(55,43)-(427,317),2
EDIT FIELD 5,SysMsgName$,(76,230)-(252,245),3,1
EDIT FIELD 6,Clearance$,(76,254)-(109,269),3,1
EDIT FIELD 7,OldMessageNumber$,(193,254)-(252,269),3,1
END IF
BUTTON 5 ,b5%
END IF
LONG IF Act%=2
EDIT FIELD #Ref%
Field%=Ref%
END IF
LONG IF Act%=5
GOSUB "Format Window"
EDIT FIELD #Field%
FLUSHEVENTS
END IF
RETURN
"Frame Button"
CALL INSETRECT(T%,-4,-4)
PEN 3,3,1,8,0
CALL FRAMEROUNDRECT(T%,16,16)
CALL INSETRECT(T%,4,4):CALL PENNORMAL
RETURN
"Build Window"
LONG IF b5%=1
WINDOW 1,"",(55,43)-(427,280),2
XELSE
WINDOW 1,"",(55,43)-(427,317),2
END IF
GOSUB "Format Window"
GOSUB "Build Edits"
RETURN
"Format Window"
CALL PENNORMAL
'RefNum%=FN OPENRESFILE("dd80:ZBasic:Mantissa.pict")
Pict&=FN GETRESOURCE(CVI("PICT"),24610)
PICTURE(245,0),Pict&
T%=135:L%=25:B%=167:R%=57
CALL PLOTICON(T%,FN GETICON(257))
CALL PENNORMAL
TEXT 3,10,1,0
T%=8:L%=8:B%=21:R%=71:TEMP$="BBS Name:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=32:L%=1:B%=45:TEMP$="BBS Folder:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=56:L%=18:B%=69:TEMP$="Settings:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=80:L%=26:B%=93:TEMP$="Report:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
PEN 1,1,1,8
T%=3:L%=72:B%=25:R%=222:CALL FRAMERECT(T%)
T%=27:B%=49:CALL FRAMERECT(T%)
T%=51:B%=73:R%=257:CALL FRAMERECT(T%)
T%=75:B%=97:CALL FRAMERECT(T%)
T%=106:L%=76:B%=119:R%=192:TEMP$="• Delete Messages •"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=126:L%=110:B%=139:R%=169:TEMP$="Day Limit"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=145:L%=111:B%=158:R%=191:TEMP$="Section Limit"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T=164:L=111:B=177:R=168:TEMP$="Epistle II"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=188:L%=40:B%=208:R%=99:GOSUB "Frame Button"
LONG IF b5%=2
T%=227:L%=72:B%=249:R%=256
CALL FRAMERECT(T%)
T%=232:L%=20:B%=245:R%=72:TEMP$="Txt File:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=56:L%=19:B%=69:TEMP$="Settings:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=255:L%=11:B%=268:R%=73:TEMP$="Clearance:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
L%=125:R%=189:TEMP$="Old Msg #:"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
T%=251:L%=72:B%=273:R%=112
CALL FRAMERECT(T%)
L%=191:R%=256
CALL FRAMERECT(T%)
T%=221:L%=10:B%=221:R%=270
CALL MOVETO(L%,T%):CALL LINETO(R%,B%)
T%=218:B%=218:R%=270:PEN 2,2
CALL MOVETO(L%,T%):CALL LINETO(R%,B%)
T%=243:L%=286:B%=259:R%=343:TEMP$="Epistle II"
CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
END IF
TEXT 0,12,0,0
RETURN
"Build Edits"
TEXT ,,0,0
LONG IF WINDOW(0)=1
TEXT 0,12,0,0
EDIT FIELD 1,RRHost$,(76,6)-(218,21),3,1
EDIT FIELD 2,BBSFolder$,(76,30)-(218,45),3,1
EDIT FIELD 3,Settings$,(76,54)-(255,69),3,1
EDIT FIELD 4,Report$,(76,78)-(255,93),3,1
LONG IF b5%=2
EDIT FIELD 5,SysMsgName$,(76,230)-(255,245),3,1
EDIT FIELD 6,Clearance$,(76,254)-(109,269),3,1
EDIT FIELD 7,OldMessageNumber$,(193,255)-(252,269),3,1
END IF
BUTTON 3 ,b3%," ",(88,124)-(112,139),2
BUTTON 4 ,b4%," ",(88,143)-(112,158),2
BUTTON 5, b5%," ",(88,162)-(112,177),2
BUTTON 1 ,1," Save ",(40,188)-(100,208),1
BUTTON 2 ,1,"Cancel",(164,188)-(228,208),1
EDIT FIELD #Field%
END IF
RETURN
"Resource Update"
GOSUB "Cursor_Spin"
a$=EDIT$(2)
Check$=RIGHT$(a$,1)
Button%=0:Act%=0:Ref%=0
IF Check$ <> ":" THEN BEEP:EDIT FIELD #2:GOTO "Loop"
RCount%=0
FOR ResourceCount%=1890 TO 1893
GOSUB "Cursor_Spin"
RCount%=RCount%+1
default$ = EDIT$(RCount%)
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
NEXT ResourceCount%
IF b3%=2 THEN default$="2" ELSE default$="1"
StrHnd&=FN GETRESOURCE(CVI("STR "),1894)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
GOSUB "Cursor_Spin"
IF b4%=2 THEN default$="2" ELSE default$="1"
StrHnd&=FN GETRESOURCE(CVI("STR "),1895)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
GOSUB "Cursor_Spin"
IF b5%=2 THEN default$="2" ELSE default$="1"
StrHnd&=FN GETRESOURCE(CVI("STR "),1896)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
LONG IF b5%=2
RCount%=4
FOR ResourceCount%=1897 TO 1899
GOSUB "Cursor_Spin"
RCount%=RCount%+1
default$ = EDIT$(RCount%)
StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
CALL SETSTRING(StrHnd&,default$)
CALL CHANGEDRESOURCE(StrHnd&)
CALL UPDATERESFILE(Refnum%)
NEXT ResourceCount%
END IF
CURSOR 0
RETURN
"Cursor_Spin"
Cur%=Cur%+1
IF Cur% > 131 THEN Cur%=128
CURSOR Cur%
IF b6%=2 THEN CALL SYSTEMTASK
RETURN
Shareware price for mantissa is $30.00.
The following is a list of features in Mantissa 3.2.
Mantissa is a message base management utility, that helps SS/Tabby
sysops maintain the high volume of echo and local mail that enter
and leave their system.
o Each message section can have a unique:
o Day limit (0-999)
o Section Limit (0-999)
o Archive Limit (0-999k)*
o Archive Location (any valid path)*
o Archives can have unique or the same archive paths*
o nonSection messages are automatically deleted*
o Global Limit Set Option*
o Global Day Limit Set Option*
o Global Archive Limit Set Option*
o Global Archive Location Set Option*
o Control 'set' Buttons for Setting unique Pathnames*
o Multiple ways to move from section to section*
o List Manager Scroll Feature*
o Popup Menus*
o Control Button Forward/Reverse*
o Menu Commands*
o Command Keys*
o On Line Help*
o Full Support of Mac Interface
o Delete by Age Only
o Delete by Limit Only
o Delete by both Age/Limit
o Master Archive On/Off switch*
o Individual Delete/Limit ON/OFF Markers*
o Renumber Messages*
o Renumber Forward from message #1*
o Renumber Reverse from high Message No.*
o Renumber Userlog, High message last read*
o Renumber on Specified Dates Only*
o Use STR's or Text file to save settings.*
o Network and Remote Maintenance supported
o Turn Mantissa Log On/Off
o Select Location and Name of Mantissa Log
o Epistle Generator
o On/Off Epistle Generator
o Max. Message Level Show Clearance
o Select location/name of Epistle Report
o Append/Erase Epistle Report
o Keep .Bak's or discard them*
o Security marker for High Clearance sections*
o Major speed boost over 1.0
o Tabby Compatible or Standalone * - New in 3.x version
In addition to Mantissa 3.2 Registered users are provided with the
updated Export 3.2. Export is a utility that is essential if you run
SS and Tabby. Export 3.2 has been greatly expanded and turbo charged.
Sysop are are given extraordinary control over data exported from their
system. Export 3.2, Probe 3.2, PreStamp 3.2 and Sundial 3.2 are only
being made available to Registered Mantissa users.
Options Available in Export 3.2:
o Point Message Support*
o Process all/new Messages*
o Delete NetMail as Processed
o Notify Sysop of Export*
o Summary of Last 5 Exports*
o Append Origin to Netmail
o D'Bridge Areafix support
o Turn Log on/off
o Select location/name of log
o Append directly to Tabby Log
o Full support of mac interface
o Use Short/Long Reports
o Node Alias for Netmail*
o Use Generic Echoes/Seenby.bbs files*
o Compatible with Origin Master (by Lance Rasmussen)
o On Line Help*
o Major speed boost over 2.52
o Erase/Append to Log* * - New in 3.x version
Utilities from, Lininger Technology:
Free to all Registered Mantissa
Versions
Export 2.54 3.2
Import 2.53 2.53 (update soon)
Sundial 2.1 3.2
PreStamp 2.0 3.2
Mantissa 1.0 (demo) 3.2
Probe .53 3.2
R.Prestamp 2.0 2.0 (update soon)
Sapphire 2.1t 2.1t (update soon)
Epistle II 1.0 1.0
TPort 1.0 1.0
*Pleiades (1) -NA- .25 (Phase 1 only)
Special thanks to,
Tom Fitzsimmons, Mark Bryant, Lance Rasmussen & Ralph Merritt
for their great ideas and for risking life and data while beta testing
the above products.
Mantissa($30.00):
Lininger Technology
Suite 'A'
385 Bowling Green Place
Gahanna, Ohio 43230
614-471-6209 226/200
Applications Freq. from 1:226/200 or 1:350/90
For General Release:
Epistle1.sit - Epistle II 1.0
Export25.sit - Export 2.54
Import25.sit - Import 2.53
Mant10.sit - Mantissa 1.0
PreStp20.sit - Prestamp 2.0
Probe.53.sit - Probe .53
RPreSt20.sit - R.Prestamp (Robot)
Sapph21t.sit - Sapphire 2.1t
Sundil21.sit - Sundial 2.1
TPort10.sit - TabbyPort 1.0
TurboT.sit - TurboPascal launch.next source (original by Pete Johnson)
ZLaunch.sit - ZBasic launch.next source code
No password required to get the above files
For Restistered Mantissa Users:
Export32.sit <password> - Export 3.21
Mant32.sit <password> - Mantissa 3.2
PreStp32.sit <password> - PreStamp 3.2
Probe32.sit <password> - Proble 3.2
Sundil32.sit <Password> - Sundial 3.2
<Password> is the first 4 uppercase characters of the filename
mentioned in your Mantissa registration cover letter
that accompanied your master disk.